﻿@model AdvCMS.Data.IAdvUser

@{
    ViewBag.Title = "EditUser";
    Layout = "~/Views/Shared/Admin.cshtml";
}

<h2>EditUser</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>IAdvUser</legend>

        @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.LabelFor(model => model.Username)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Username)
            @Html.ValidationMessageFor(model => model.Username)
        </div>

           <div class="editor-label">
            @Html.LabelFor(model => model.Password)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Password)
            @Html.ValidationMessageFor(model => model.Password)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Comment)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Comment)
            @Html.ValidationMessageFor(model => model.Comment)
        </div>

     

       
        <div class="editor-label">
            @Html.LabelFor(model => model.IsApproved,"Approved")
        </div>
        <div class="editor-field">
            @Html.CheckBoxFor(model => model.IsApproved)
         
        </div>


        <div class="editor-label">
            @Html.LabelFor(model => model.IsLockedOut,"Locked Out")
        </div>
        <div class="editor-field">
            @Html.CheckBoxFor(model => model.IsLockedOut)
         
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LastActivityDate,"Last Activity Date")
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.LastActivityDate,"NULL")
          
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LastLoginDate,"Last Login Date")
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.LastLoginDate)
          
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LastPasswordChangedDate,"Last Password Changed Date")
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.LastPasswordChangedDate)
       
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CreationDate,"Creation Date")
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.CreationDate)
           
        </div>

        

        

        <div class="editor-label">
            @Html.LabelFor(model => model.LastLockedOutDate,"Last Locked Out Date")
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.LastLockedOutDate)
           
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FailedPasswordAttemptCount,"The number times of Failed Password Attempt" )
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.FailedPasswordAttemptCount)
         
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FailedPasswordAttemptWindowStart,"Date Time of Last Failed Password Attempt")
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.FailedPasswordAttemptWindowStart)
           
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FailedPasswordAnswerAttemptCount,"The number times of Password Answer Failed Attempt")
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.FailedPasswordAnswerAttemptCount)
        
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FailedPasswordAnswerAttemptWindowStart, "Date Time of Last Password Answer Failed Attempt")
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.FailedPasswordAnswerAttemptWindowStart)
         
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "List")
</div>
